package course1;

import java.util.List;
import java.util.Scanner;
import java.util.Vector;

public class Test {
    public static void main(String[] args) {
        System.out.println("请输入成绩：（负数结束）");
        Scanner s = new Scanner(System.in);
        Vector v = new Vector();
        int maxscore = 0;
        for (;;){
            Integer score=s.nextInt();
            if (score < 0){
                break;
            }
            if (maxscore < score){
                maxscore=score;
            }
                v.addElement(score);

        }

        String level = new String();
        for (int i = 0;i<v.size();i++){
            Integer s1 = (Integer)v.elementAt(i);
            if (maxscore-s1<10){
                level="A";
            }else if (maxscore-s1<20){
                level="B";
            }else{
                level="C";
            }
            System.out.println("等级为"+level);
        }
    }
}
